package com.shop.service;

import com.shop.dao.ProductMapper;
import com.shop.pojo.Product;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

public class ProductServiceImpl implements ProductService{
    private ProductMapper productMapper;

    public void setProductMapper(ProductMapper productMapper) {
        this.productMapper = productMapper;
    }

    @Override
    public Product queryProductById(int productId) {
        return productMapper.queryProductById(productId);
    }

    @Override
    public List<Product> queryAllProduct() {
        return productMapper.queryAllProduct();
    }

    @Override
    public List<Product> searchProducts(Map<String,Object> params) {
        return productMapper.searchProducts(params);
    }
}
